<template>
	<page  ref='page'>
		<view class="page">
			<u-parse :html="info.content" v-if="info"></u-parse>
			<foot></foot>
			<operation :info='info' type='3' v-if='info'></operation>
		</view>
	</page>
</template>

<script>
	import {setAddShare} from "@/utils/postRequest.js"
	import {getPtShow} from '../static/api.js'
	import  uParse from '@/components/u-parse/u-parse.vue'
	import foot from '@/components/foot.vue'
	import operation from '@/pagesHome/operation.vue'
	export default {
		components:{
			uParse,
			foot,
			operation
		},
		data() {
			return {
				info:null
			}
		},
		methods: {
			getPtShowInfo(){
				getPtShow().then(res=>{
					this.info = res
				})
			}
		},
		async onShareAppMessage(res) {
		  await  setAddShare({id:this.info.id,type:3,isErr:false})
		   this.info.transmit ++ 
		  return {
			title: this.info.title,
			imageUrl: this.$global.shareImg,
			path: `/pagesHome/platform/platform?invitation_code=${this.$store.state.userInfo ? this.$store.state.userInfo.invitation_code : ''}`,
		  };
		},
		async onShareTimeline(ops) {
		  await  setAddShare({id:this.info.id,type:3,isErr:false})
		   this.info.transmit ++ 
		  return {
			title: this.info.title,
			imageUrl: this.$global.shareImg,
			path: `/pagesHome/platform/platform?invitation_code=${this.$store.state.userInfo ? this.$store.state.userInfo.invitation_code : ''}`,
		  };
		},
		onLoad() {
			this.getPtShowInfo()
		}
	}
</script>

<style scoped>
	.page{
		padding: 0 36rpx;
		width: 100%;
		box-sizing: border-box;
	}
	@import url("./platform.css");
	
</style>
